<!---crops the image--->
<cfset lastcount = cookie.current_step>
<cfset nextcount = cookie.current_step + 1>
<cfset lastcount = "#lastcount#_">
<cfset nextcount = "#nextcount#_">

<cfset cimage = imageread('#request.basepath#images/temp/#cookie.imagefile#')>
<cfset ImageCrop(cimage,form.x,form.y,form.w,form.h)>

<cfset oldimage = '#request.basepath#images/temp/#cookie.imagefile#'>
<cfset newimage = "#request.basepath#images/temp/#replace(cookie.imagefile, lastcount, nextcount)#">

<cfcookie name = "imagefile" value="#replace(cookie.imagefile, lastcount, nextcount)#">

<cfset nextstep = cookie.current_step + 1>
<cfcookie name = "current_step" value="#nextstep#">

<!---Write Image to Temp Folder---> 
<cfset ImageWrite(cimage, '#newimage#')>

<cfinclude template="../frm/edit.cfm">
